Talk:AjaxRedirect
__TOC__ Monobook? Would you consider adding some code that creates a Redirect tab in Monobook? Thanks! :) — SpikeToronto 06:54, December 15, 2014 (UTC) :I'll add it to my to-do list, I can't give a definite answer when I'll get around to doing it though. – Ozuzanna 17:37, December 15, 2014 (UTC) :Done. – Ozuzanna 11:17, December 17, 2014 (UTC) ::Thanks Ozzie! :) — SpikeToronto 13:11, December 22, 2014 (UTC) ::UPDATE: I notice that, in the Monobook skin, the script has added the Redirect option in FIVE (5) different places. :D It would make more sense to have it appear in only one place; and, the best place for that would be the toolbox. Thanks! :) 19:33, January 10, 2015 (UTC) :::Thanks for pointing that out. To be consistent with the way it is in Oasis, I've restricted it to where it was initially supposed to go (alongside the other page options such as move) at the top. – Ozuzanna 20:07, January 10, 2015 (UTC) ::::Thanks Ozzie! The only thing is, the tabs are getting pretty crowded in the Monobook skin. That’s why I suggested putting it in the “toolbox”. However, if we could adapt wikipedia:User:Haza-w/cactions.js to work here at Wikia, it would transform the Monobook tabs area, and crowding would no longer be an issue. Thanks! — SpikeToronto 20:19, January 10, 2015 (UTC) :::::From a glance, that code doesn't work. There's a variable in there that comes up as undefined for Wikia, and I do not use the Monobook skin really so it's not within my reach to fix - though if you'd like to add CSS that bunches them together (like this), you can add the following CSS to your global css (assuming you don't have any CSS to do this already): #p-cactions > .pBody > ul > li { margin:0;padding:0;float:left } ::::: – Ozuzanna 20:33, January 10, 2015 (UTC) ::::::Ozzie: Thanks for that code! :) I wonder if there is CSS that could make the tabs wrap to a second line when they reach the right edge of the page? The reason I ask is that I’ve accumulated so many tabs in Monobook that they run right off the page on the righthand side. It’d be neat if they could wrap. In the meantime, I’m off to implement your CSS above. Thanks! :) — SpikeToronto 20:55, January 10, 2015 (UTC) UPDATE: You’ll love this irony. Okay. I added the CSS from above and it looked awesome: all the tabs lined up cheek by jowl, with room to spare. Then I noticed that SIX (6) tabs were missing: * FOUR (4) from the FastDelete script * ONE (1) for my skin switcher * ONE (1) for ShowAds The ironic thing is, if I had just stopped loading those scripts, all the tabs would have fit anyway. :D Any ideas Ozzie? Thanks! :) — SpikeToronto 21:29, January 10, 2015 (UTC) :I mimicked your CSS/JS and imported them on a wiki where I have admin rights - they worked fine. Is this why? – Ozuzanna 21:46, January 10, 2015 (UTC) User group limitation statement Thanks Oz for adding to the instructions the code for limiting which user groups would have the “redirect” option appear on their screens. :) Sadly, and because I don’t understand anything about JS — I’m not even sure I just now spelled it correctly :P — I cannot decrypt the difference between that limitation statement and one I was given the other day. Would someone please explain the difference in operation between these two different JS import statements? if (mw.config.get("wgUserGroups").join(' ').indexOf('sysop') != -1) importScriptPage('AjaxRedirect/code.js', 'dev'); and if (mw.config.get('wgUserGroups').indexOf('sysop') > -1) { importScriptPage('AjaxRedirect/code.js', 'dev'); } Thanks, and sorry JS just can’t seem to penetrate my noggin. :$ — SpikeToronto 13:29, December 22, 2014 (UTC) :For what you are doing, both do the same thing. .indexOf() returns -1 when it doesn't find a match. So checking != or > doesn't matter. :The first method uses .join() which converts the array into a string then uses .indexOf() whereas the 2nd one does it directly on the array. :It doesn't matter which you use because you only want to check if the group exists or not and not at which index it lies. :Personally I'd use the 2nd over the 1st since it has one step less :D --''~UltimateSupreme'' 15:11, December 22, 2014 (UTC) ::I agree, the .join() isn't necessary here. Thanks, I'll update that. – Ozuzanna 15:12, December 22, 2014 (UTC) :::Thanks guys! :) — SpikeToronto 16:47, December 22, 2014 (UTC)